package com.xunji.standard.config;

import com.xunji.standard.service.CodeBookService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author: xuqiang_imyours
 * @Date: 2025/8/25 9:06
 * @Description:
 **/
@Component
@Slf4j
public class CodeBookConfiguration implements ApplicationRunner {

    @Resource
    private CodeBookService codeBookService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("初始化码簿");
        codeBookService.updateCache();
    }
}
